package com.bw.home.api

import com.bw.http.http.okhttp.HttpRetrofitAnnotation
import com.bw.http.http.okhttp.HttpsClientAnnotation
import com.bw.http.http.okhttp.RetrofitManger
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import okhttp3.OkHttpClient
import retrofit2.Retrofit
import javax.inject.Singleton

/**
 * 首页hilt模块
 */
@Module //声明当前是一个Hilt模块
@InstallIn(SingletonComponent::class) //声明当前类的作用域是整个应用
object HomeHiltModel {
    @Provides
    @Singleton
    fun getHomeServerModel(@HttpRetrofitAnnotation retrofit: Retrofit): HomeApiServer{
        return retrofit.create(HomeApiServer::class.java)
    }
}